#include <iostream>
#include  <math.h>
using namespace std;

int n, N;
int r;

int geterroer(int a[]){
    int error = 0;
    int last = 0;
    int lastindex = 0;
    int sub = a[1]-a[0];
    int lasti = 0;
    for(int i=0;i<=N-1;i++){
        int gx = int(i/r);
        if(i<a[n]){
            if(i<lastindex+sub){
                   error += abs(gx-lasti);
            }
            else{
                lasti = lasti + 1;
                 sub = a[lasti+1]-a[lasti];
                 error +=abs(gx-lasti);
                lastindex = i;
            }
            
        }
        else{
            error += abs(gx-n);
        }
       //sum+= (a[i+1]-a[i]) * i;
    }
    //sum = sum + (N-a[n])*n;
    return error;
}

int main()
{
    cin >> n >> N;
    r = int(N / (n + 1));
    int a[n + 1] = {0};
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];
    }
    cout<<geterroer(a)<<endl;
    system("pause");
}